#!/bin/bash
git reset --hard
git pull
chmod 777 *
go build
count=`ps -ef |grep TryEverything |grep -v "grep" |wc -l`
echo $?
echo $count
if [ $count -eq 0  ] ; then
   echo "start process......"
  supervisorctl restart TryEverything
else
   echo "runing..."
   ps -ef | grep TryEverything | grep -v grep | awk '{print $2}' | xargs kill -9
   echo $?
   supervisorctl restart TryEverything

   
fi
	  